/**
 *
 */
package hichecker.ui.components.custom_table.table_cell_editor;

import hichecker.ui.components.custom_table.column_class.Grade;

import javax.swing.JTextField;

/**
 *
 */
public class GradeEditor extends AbstractTableCellEditor {

	public GradeEditor() {
		comp.setHorizontalAlignment(JTextField.RIGHT);
	}

	@Override
	public boolean isValidInput() {
		return Grade.isGrade(comp.getText());
	}

	@Override
	protected String getModifiedInput() {
		return "" + Grade.parseGrade(comp.getText());
	}

}
